﻿Imports System.Xml.Serialization
Imports System.Collections.ObjectModel

Namespace Settings
    Partial Class Settings
        Public Sub New()
            Me.InfoGens = New SettingsInfoGens
            Me.Proccessors = New SettingsProccessors
            Me.Senders = New SettingsSenders
        End Sub

        Private Shared DefaultInstance As Settings
        <XmlIgnore()>
        Public Shared ReadOnly Property [Default] As Settings
            Get
                If DefaultInstance Is Nothing Then
                    DefaultInstance = My.Settings.Settings.ToClass(Of Settings)()
                End If
                If DefaultInstance Is Nothing Then
                    DefaultInstance = New Settings
                End If
                Return DefaultInstance
            End Get
        End Property
    End Class

    Partial Class SettingsInfoGens
        Public Sub New()
            Me.CachedItem = New ObservableCollection(Of SettingsInfoGensItem)()
            Me.SearchPath = New ObservableCollection(Of String)()
        End Sub
    End Class

    Partial Class SettingsProccessors
        Public Sub New()
            Me.CachedItem = New ObservableCollection(Of SettingsProccessorsItem)()
            Me.SearchPath = New ObservableCollection(Of String)()
        End Sub
    End Class

    Partial Class SettingsSenders
        Public Sub New()
            Me.CachedItem = New ObservableCollection(Of SettingsSendersItem)()
            Me.SearchPath = New ObservableCollection(Of String)()
        End Sub
    End Class
End Namespace